<template>
	<view class="my">
		<!-- 头部 -->
		<view class="my-header">
			<view class="header-main">
				<view class="header-config" @tap="goConfig">
					<image class="config-img" src="../../static/img/config.png" mode=""></image>
				</view>
				<view class="header-logo">
					<image class="logo-img" :src="loginStatus ? userInfo.imgUrl : '../../static/img/icons1.png' " mode=""></image>
					<view class="logo-name">{{ loginStatus ? userInfo.nickName : "用户昵称" }}</view>
				</view>
				<view class="header-message">
					<view class="iconfont iconxiaoxi1 message"></view>
				</view>
			</view>
		</view>
		<!-- 我的订单 -->
		<view class="order">
			<view class="order-title" @tap="goOrder">
				<view>我的订单</view>
				<view>全部订单  > </view>
			</view>
			<view class="order-list">
				<view class="order-item">
					<image class="order-img" src="../../static/img/order1.png" mode=""></image>
					<view class="">待付款</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order2.png" mode=""></image>
					<view class="">待发货</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order3.png" mode=""></image>
					<view class="">待收货</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order4.png" mode=""></image>
					<view class="">待评价</view>
				</view>
				<view class="order-item">
					<image class="order-img" src="../../static/img/order5.png" mode=""></image>
					<view class="">退款管理</view>
				</view>
			</view>
		</view>
		<!-- 内容列表 -->
		<view class="my-content">
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my1.png" mode=""></image>
						<view class="">我的收藏</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my2.png" mode=""></image>
						<view class="">我的优惠券</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my3.png" mode=""></image>
						<view class="">我的积分</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my4.png" mode=""></image>
						<view class="">加入超级VIP</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my5.png" mode=""></image>
						<view class="">帮助中心</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my6.png" mode=""></image>
						<view class="">联系客服</view>
					</view>
					<view class="arrow">></view>
				</view>
				<view class="my-content-item">
					<view class="my-item-left">
						<image class="my-item-img" src="../../static/img/my7.png" mode=""></image>
						<view class="">商家入驻</view>
					</view>
					<view class="arrow">></view>
				</view>
		</view>
		<Tabbar currentPage='my'></Tabbar>
	</view>
</template>

<script>
	import { mapState } from 'vuex';
	import Tabbar from '@/components/common/Tabbar.vue'
	export default {
		data() {
			return {
				
			}
		},
		components: {
			Tabbar
		},
		computed: {
			...mapState({
				loginStatus: state => state.user.loginStatus,
				userInfo: state => state.user.userInfo
			})
		},
		methods: {
			goConfig() {
				uni.navigateTo({
					url:"../my-config/my-config"
				})
			},
			goOrder() {
				uni.navigateTo({
					url:"../my-order/my-order"
				})
			}
		}
	}
</script>

<style scoped>
	.ny {
		background-color: #CCCCCC;
	}
.my-header {
	background: url(../../static/img/mybg.png) no-repeat;
	width: 100%;
	height: 400rpx;
}
.header-main {
	position: relative;
	top: 120rpx;
}
.header-config {
	position: absolute;
	left: 40rpx;
	font-size: 36rpx;
}
.header-logo {
	position: absolute;
	left: 50%;
	margin-left: -60rpx;
	width: 150rpx;
	text-align: center;
}
.config-img {
	width: 40rpx;
	height: 40rpx;
}	
.logo-img {
	width: 120rpx;
	height: 120rpx;
	border-radius: 50%;
	border: 2rpx solid #CCCCCC;
	background-color: #FFFFFF;
}
.logo-name {
	font-weight: bold;
	color: #FFFFFF;
	text-align: center;
}
.order-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20rpx;
}
.order-list {
	padding: 20rpx;
	display: flex;
	border-top: 1px solid #f3f3f3;
	border-bottom: 1px solid #f3f3f3;
}
.order-item {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.order-img {
	width: 50rpx;
	height: 50rpx;
}
.my-content {
	margin: 20rpx 0;
	padding: 0 40rpx;
}
.my-content-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24rpx 0;
	border-bottom: 1px solid #f3f3f3;
}
.my-item-img {
	width: 60rpx;
	height: 60rpx;
	padding-right: 20rpx;
}
.my-item-left {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
}
.arrow {
	padding-right: 0 20rpx;
	font-size: 18px;
	color: #808080;
}
.header-message {
	position: absolute;
	right: 40rpx;
	color: #fff;
	font-size: 36rpx;
}
</style>
